import { creatStore, applyMiddleware } from 'redux'
import reducer from './reducer'
import saga from './saga'
import createSagaMiddleware from '@redux-saga/core'
const SagaMiddleWare = createSagaMiddleware()
const store = creatStore(reducer, applyMiddleware(SagaMiddleWare))

//运行saga任务
SagaMiddleWare.run(saga)
export default store